home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir36
/
gr20.zip
/
GR.DOC
< prev
next >
Wrap
Text File
|
1994-10-18
|
26KB
|
487 lines
GR.EXE ver 2.0
GSCRIPT.EXE ver 2.0
UNREGISTERED EVALUATION COPY!
(c) Copyright 1994 by D.S. SOFTWARE
Written by David Slater
Revision number 2
--------------------------------▄▄▄▄▄▄▄▄▄▄▄▄----------------------------------
█ CONTENTS █
--------------------------------▀▀▀▀▀▀▀▀▀▀▀▀----------------------------------
1.1 - What is GR.EXE ?
2.1 - How to use the program.
3.1 - Explanation of the commands.
4.1 - How to use GSCRIPT.EXE
5.1 - Registration
------------------------------------------------------------------------------
1.1 WHAT IS GR.EXE?
GR.EXE is a tool for producing ANSI type graphics on your screen! It
doesn't save them in a file, it simply draws them on your screen for you.
For example, let's say that you wanted to dress up the look of a batch file
that you wrote. You could use GR.EXE from within your batch file to create
the graphics that you wanted on your screen. This means instead of the old
Black and White approach you could have color boxes, pop up screens, a screen
blanker and much more. You could even use it to dress up programs that you
write in a programming language or just to help you design a screen.
Now like I said before, GR.EXE is only a TOOL! It's your imagination
that can use this tool to create the things you want. This program is by
no means a miracle worker! You cannot paint a picasso with it but you can
do some pretty neat little things to dress up the screen.
By now I guess your wondering how to use this thing and if it is
going to be complicated! Well the next few sections should answer that
question for you.
------------------------------------------------------------------------------
2.1 HOW TO USE THE PROGRAM
Well for starters this is a program that runs completely from the
command line. It's kind of like using the DIR command in DOS, there are
different switches that you pass to GR.EXE to tell it to do different things
For example, if you type the following at the DOS prompt - GR /CLR1 9 1
then that tells GR.EXE to clear the screen to the forground color of BRIGHT
BLUE and the background color of BLUE. The forground color applies to things
like text and ASCII characters and the background color is the color of the
screen! Sound easy? Well it is, all you need is a liitle practice to get
familiar with the commands and your imagination!
Now let's go check out the commands that you need to know so you can
get started................
------------------------------------------------------------------------------
3.1 EXPLANATION OF THE COMMANDS
OK, now here is the hard part (HA,HA just kidding)! Before you check
out the commands there are a few quick things that you need to understand....
all smart guys that already know all this stuff feel free to skip ahead.
Most computer screens are made up of 25 lines from top to bottom and
80 spaces from left to right on each line. GR.EXE first looks for a switch
on the command line like /B1 , this stands for BOX1 and tells GR.EXE that you
want to draw a single line box. But before GR.EXE can draw the box, you have
to give it the coordinates and the color of the box.
Now look at the whole command : GR /B1 ULX ULY LRX LRY FCOLOR BCOLOR
ULX stands for UPPER LEFT X or how many spaces over on the screen do you want
your upper left corner of your box to start at, (remember you have 80 spaces
across). ULY stands for UPPER LEFT Y or how many lines down from the top of
the screen that you want the upper left corner of your box to start at,
(remember you have 25 lines from top to bottom). LRX and LRY are the same as
above except they ask you to tell GR.EXE how many spaces across and how many
lines down that you want your LOWER RIGHT corner of your box to be.
FCOLOR stands for FOREGROUND COLOR and BCOLOR stands for BACKGROUND
COLOR. These parameters tell GR.EXE what color the box should be. Colors
are assigned to GR.EXE by numbers also, see the chart below!
------------------------------------------------------------------------------
COLOR CHART
0 - BLACK 8 - DARK GREY
1 - BLUE 9 - LIGHT BLUE
2 - GREEN 10 - LIGHT GREEN
3 - CYAN 11 - LIGHT CYAN
4 - RED 12 - LIGHT RED
5 - MAGENTA 13 - LIGHT MAGENTA
6 - BROWN 14 - YELLOW
7 - LIGHT GREY 15 - WHITE
NOTE! : There has been a change in this new version of the
program regarding the colors. In the last version of the
program, all the colors could be used for FOREGROUND COLORS,
but only colors 0 - 7 could be BACKGROUND COLORS. This is
because colors 8 - 15 would cause the display to blink if
used for the background.
Now you may use any color scheme that you want and it
will work! This allows for greater creativity in your designs,
and makes life a little easier for the artist lurking inside
some of you.
--------------------------------------------------------------------------------------------
Now let's say we wanted to draw a single line box that was 20 spaces
over and 10 lines down for the upper left corner, and 40 spaces over and 15
spaces down for the lower right corner, and we want it to be LIGHT CYAN on
CYAN. You would type the following... GR /B1 20 10 40 15 11 3 and hit ENTER!
You now have the box on your screen, but there is still a DOS prompt
there too! This is where the BATCH file comes in, (or programming language).
If you run GR.EXE from a BATCH file or another PROGRAM that you write it will
simply draw the box and then go back to the next command in your batch file
or program! You have 26 different commands that you can use with GR.EXE so
all you have to do is use the ones that you want and be creative.
Each of the 26 commands is independant of the others, so you may only
use 1 of them at a time. This means that in order to have GR.EXE do several
things for you, you will have to run the program several times, each time
with a different command. Now lets look at all the commands..............
1) /B1 ULX ULY LRX LRY FCOLOR BCOLOR (This draws a single line box)
2) /B2 ULX ULY LRX LRY FCOLOR BCOLOR (This draws a double line box)
3) /B3 ULX ULY LRX LRY FCOLOR BCOLOR (This draws a fat line box)
4) /B4 ULX ULY LRX LRY FCOLOR BCOLOR SHCOLOR (This draws a single line box
with a shadow. The shadow will only show up if the screen is a color
other than black. The shadow can be any color, but BLACK,LIGHT GREY and
DARK GREY are the favorites!) !NOTE! - In order for a shadow color to
be displayed properly you must have used one of the /CLR# commands that
uses a CLEAR-CHARACTER "before" executing this command, otherwise the
shadow will be black. Use /CLR2 or /CLR4 if you want to change the
shadow color.)
5) /WA ULX ULY (TEXT TO WRITE) FCOLOR BCOLOR (This allows you to write
text to any part of the screen and assign it a color value! NOTE : If
you write more than one word you must use ALT-255 instead of the spacebar
to separate the words. To do this, hold down the ALT key and type 255 on
the keypad, (not the numbers above the keyboard), and then let go of the
ALT key. This will appear to put a space on the screen, but in fact it
is just an invisible character. See the example below.........
EX: GR /WA ULX ULY HELLO(alt-255)THERE FCOLOR BCOLOR The command will
print HELLO THERE on your screen at the coordinates you give and with the
color value you give.)
6) /CN (This puts the cursor back to normal)
7) /CO (This turns the cursor off)
8) /CF (This makes the cursor fat)
9) /CB (This makes the cursor a block)
10) /CLR1 FCOLOR BCOLOR (This command clears the screen to the FOREGROUND
and BACKGROUND colors that you choose)
11) /CLR2 FCOLOR BCOLOR CLEAR-CHARACTER (This command clears the screen to
the FOREGROUND and BACKGROUND colors that you choose and uses a character
from the keyboard or any valid ASCII character to clear the foreground
with. EX: GR 9 1 ▒ In this example we used the ASCII character ALT-177
to clear the foreground with. The colors used are LIGHT BLUE on BLUE.)
12) /CLR3 FCOLOR BCOLOR BORDER-COLOR (This command clears the screen to
the FOREGROUND and BACKGROUND colors that you choose and makes a BORDER
around the screen with the color that you choose. Valid border colors
are 0-7)
13) /CLR4 FCOLOR BCOLOR CLEAR-CHARACTER BORDER-COLOR (This command clears
screen to the FOREGROUND and BACKGROUND colors that you choose and clears
the foreground with CLEAR-CHARACTER and makes a BORDER around the screen
with the color that you choose. See /CLR2 and /CLR3)
14) /KEY (This tells GR.EXE to wait for a key from the keyboard to be
pressed before going on to the next line in your batch file or program!)
15) /SKEY KEY-TO-PRESS (This command lets you tell GR.EXE what key to look
for before going on to the next line in your batch file or program.....
EX: GR /SKEY Q This example tells GR.EXE to wait until a "Q" is pressed
before going on. The /SKEY command accepts any letter or number as a key
to wait for. Keys such as F1 or Tab are not supported here!)
16) /BLANK (optional BORDER-COLOR) (This command will completely black out
the screen until a key is pressed. The optional BORDER-COLOR parameter
is to let /BLANK know if your screen was using one so it can replace it
when it comes back.)
17) /WIPE1 FCOLOR BCOLOR (This command will do a fancy wipe of your screen
clearing from top and bottom towards the center with the FOREGROUND and
BACKGROUND colors that you choose!)
18) /PB1 ULX ULY LRX LRY FCOLOR BCOLOR ULX ULY (text to write) FCOLOR BCOLOR
(This command will cause a box to pop up on your screen at the coordinates
that you give and the colors you give. It also allows you to write one
line of text in the box at the colors you give and waits for any key from
the keyboard to be pressed. After a key has been pressed the box dissapears
and returns your screen back to the way it was before. NOTE: The words
that you write on the box must be seperated by a ALT-255 character not a
space from the spacebar. See the /WA command for details on doing this.)
19) /PB2 ULX ULY LRX LRY FCOLOR BCOLOR SHCOLOR ULX ULY (text to write) FCOLOR
BCOLOR (This command does the same thing as /PB1 with the exception
that it allows you to add a shadow to your pop up box (SHCOLOR). Also
remember that the words that you write on the box must be separated by a
ALT-255 character not a space from the spacebar. See the /WA command for
details on how to do this.) ( Also if you have trouble with the shadow
color always being black, see the /B4 command on how to fix this!)
20) /P (time to wait) (This command tells GR.EXE to pause for the amount
of time that you specify. Time is specified by a number. The number
is read as tenth of seconds. EX: GR /P 10 This example will pause for
10 tenths of a second, or 1 full second. NOTE!: This command does not
read decimals, only whole numbers!)
21) /PICK (This command has no parameters, it simply reads a key from the
keyboard and sets the DOS variable ERRORLEVEL to the key that was pressed.
This command was designed for use in batch files so that you can make a
menu with numbers representing your menu items. After displaying your
menu screen, execute this command and when the user presses a key the
ERRORLEVEL variable is set to that key and control is returned to your
batch file. You would then use IF ERRORLEVEL (number) GOTO (Labelname).
(number) is where you place the number you want to check for and
(Labelname) is where you put the name of the label you want to jump to
if the (number) matches what is in ERRORLEVEL. Do not include the
parenthesis. Also always list your (numbers) in decreasing order....
EX: IF ERRORLEVEL 3 GOTO THREE
IF ERRORLEVEL 2 GOTO TWO
IF ERRORLEVEL 1 GOTO ONE
In a batch file the IF ERRORLEVEL statement only reads numbers so don't
use letters in the statement. If a letter is pressed ERRORLEVEL
will be set to the ASCII code# for that letter which is a number. Upper
and lower case letters have different ASCII code#'s. If you look up the
code#'s for the letter and special keys and know what your doing then
you can use letters or special keys in your program. I have provided
a program that uses GR.EXE with the /PICK command that will show you
the ASCII code# for letters and special keys. Run the program PKEY.EXE
in the same directory as GR.EXE and follow the instructions. The
program will ask you to press a key and then show you the ASCII code#
for that key. Remember upper and lower case letters have different
code#'s.)
22) /JBOX1 ULX ULY LRX LRY FCOLOR BCOLOR JEWELCOLOR (This command is for
creating what I call a JEWEL BOX. It is just about the same as the
/B1 command with the exception of the parameter called JEWELCOLOR.
The JEWELCOLOR is spelled out instead of using a number. Valid words
for this parameter are BLACK,BLUE,GREEN,CYAN,RED,MAGENTA,GOLD and WHITE.
This box is very attractive and I put alot of work into making it.
You'll definitely want to check it out along with its' partner below!!)
23) /JBOX2 ULX ULY LRX LRY FCOLOR BCOLOR JEWELCOLOR SHCOLOR (This is the
same as above with the exception that this box has a shadow. Remember
your shadow will only show up if the screen is a color other than
BLACK, and the then the shadow will still be black unless you have
cleared the screen with /CLR2 or /CLR4. This is because your shadow
needs something to reflect off of in order to show it's true color.
I personally like to clear the screen with the ALT 177 character "▒".
It uses the foreground color as its' color and still lets ths background
color show through. Your shadow will reflect well off of this character.
I usually use DARK GREY, "8", for my shadows.)
24) /PJBOX1 ULX ULY LRX LRY FCOLOR BCOLOR JEWELCOLOR ULX ULY (text to write)
FCOLOR BCOLOR (This command is basically the same as /PB1 with the
exception that this is a JEWEL BOX and it needs to know the color name
in the parameter JEWELCOLOR. See /JBOX1 for the valid color names.
This is a pop-up box which waits for a key and then restores the screen.
One line of text can be written in this box at the given coordinates
and color values.)
25) /PJBOX2 ULX ULY LRX LRY FCOLOR BCOLOR JEWELCOLOR SHCOLOR ULX ULY
(text to write) FCOLOR BCOLOR (This command is baically the same as /PB2
with the exception that this is a JEWEL BOX and it needs to know the color
name in the parameter JEWELCOLOR. See /JBOX1 for the valid color names.
This is a pop-up box with a shadow which waits for a key and then
restores the screen. One line of text can be written in this box at the
given coordinates and color values.)
26) /CLRBOX ULX ULY LRX LRY FCOLOR BCOLOR (optional CLEAR-CHARACTER)
(This command will clear an area of the screen to the given FCOLOR and
BCOLOR at the coordinates that you give. The CLEAR-CHARACTER is optional.
The command actually clears the area just inside the coordinates, so
that you can draw a box and then use the same coordinates for /CLRBOX
and the box will be cleared inside the borders of the box. This command
used with the optional CLEAR-CHARACTER can also be useful in creating
some very interesting screens. NOTE!: - When using a command like this
one that has an optional parameter do the following if you do not use
that parameter....With GR.EXE simply omit the parameter from the command
line....With GSCRIPT.EXE make sure and leave a blank space in your script
file where the parameter would have been placed.
------------------------------------------------------------------------------
4.1 HOW TO USE GSCRIPT.EXE
Now that you have learned how to use GR.EXE then you are ready for
some real power! GSCRIPT.EXE is even better than GR.EXE because it can do
multiple commands all at once. This means that instead of having to run
GR.EXE over and over to produce one screen, now you can do the same thing
by running GSCRIPT.EXE once!!
Don't get me wrong, GR.EXE will still come in handy but now you may
want to use it for a tool to help you with GSCRIPT.EXE. You see I wrote
GR.EXE first and uploaded it to a few places but after showing it to a
friend of mine, he said it would be great if it could read a script file!
If it could do this then the screen writes would be faster when you wanted
it to do more than one thing. At first I was going to rewrite GR.EXE to
make it do this but I decided to write GSCRIPT.EXE instead so you could
have them both.
What I do now is use GR.EXE to help me figure out how I want each
thing on my screen to look. Then I write a script file for GSCRIPT.EXE
to read from using all the bits and pieces that I created with GR.EXE!
So as I said before GR.EXE is still very handy.
I guess by now you want me to shut up so you can find out how to
use this thing, right? OK, here we go......
GSCRIPT.EXE reads a file that you create called "SCRIPT.GR" .
It reads the file starting at the LABEL that you tell it to start from.
Each label can hold only one command each, so in order for it to read more
than one command you have to make several labels each with the SAME NAME!
GSCRIPT.EXE is started like this....GSCRIPT [LABEL]. Now let's say that
in your script file you make a label called SCREEN1. In order for GSCRIPT
to read what is in this label you have to type....GSCRIPT SCREEN1
GSCRIPT will now execute the command given in SCREEN1 and then it will look
to see if there is another label called SCREEN1 right after the last one.
If there is then it will continue to execute each label called SCREEN1 until
it finds a different label name or it comes to the end of the file.
BUT the first thing you have to do is to use a text editor and create
the file SCRIPT.GR, then you use LABELS in the file to tell GSCRIPT where
it should read from. Below is an EXAMPLE of what a script file looks like.
------------------------------------------------------------------------------
SCREEN1 "This is a label, it can be any name up to 12 characters"
/CLR4 "This is a command, notice that each part of the"
9 "command is on a different line"
1
▒
4
SCREEN1 "Here we have another label with the same name as the"
/B1 "first one. This is nessesary so that GSCRIPT.EXE can"
20 "include this in the same screen!"
10
60
15
11
3
SCREEN2 "This label will not be included with the above commands"
/CLR1 "because it has a different name. To access this label "
7 "you would type..... GSCRIPT SCREEN2
0
_______________________________________________________________________________
This is just a very small example of what you can do with a script
file! The key to remember is that unlike using commands with GR.EXE where
the command is all on one line, in a script file each part of a command is
placed on a separate line.
On the command /BLANK (optional BORDER COLOR), if you didn't want to
use the optional BORDER COLOR, you would put a blank space in your label
where that parameter would normally go.
On the commands that let you write text, you don't have to put a
ALT-255 between the words like you do with GR! This is because GSCRIPT
reads the line in your script file as one parameter.
Also you must put all alike LABELS one after another! In other words
you can't write SCREEN1 then SCREEN2 then SCREEN1 again, because only the
first SCREEN1 would be read.
All label names and command parameters must begin at the far left, you may
not indent!!! You may however place comments in your script file as long
as they are more than 12 spaces over from far left, and it is best to
place comments next to the LABEL because certain parameters will read 80
spaces across which would include any comments that might be on that line
too.
NOTE!: If you write a command under a label and it doesn't seem to
work right, go back and make sure that you included all the nessesary
parameters.
REVISION #1: I fixed the use of the /WIPE1 command so that you can
use it more than once in a row. Before if you used it more than once in two
alike labels, the second time it wouldn't work. If you know anyone that has
complained of this problem please pass this revised version to them. Also
I've added a demo SCRIPT.GR that you can run by typing GSCRIPT DEMO and
pressing ENTER. Since the shareware version only allows you to read this
particular file name, you may want to rename the file to save for further
reference. It only makes use of one label name called DEMO. If you pass
the program on to a friend or upload it to a BBS please make sure and rename
the file back to SCRIPT.GR and include it with the program.
REVISION #2: I added several more commands to both GR.EXE and
GSCRIPT.EXE to make the program more flexible. The additions include
the following.... /PICK, /JBOX1, /JBOX2, /PJBOX1, /PJBOX2, /CLRBOX and
now you can use any color for foreground or background colors without
causing the display to blink. There is also a small program for use with
the /PICK command called PKEY.EXE. This utility is used to find out the
ASCII code#'s for the keyboard keys.
In the REGISTERED version you will be able to call your script file
anything that you want thus allowing you to make several of them! The
SHAREWARE version of GSCRIPT.EXE will only read a script file called
SCRIPT.GR
Well that about covers it, the best way to learn how to use this
stuff is to get out of this DOC and start typing scripts. I hope I made
everything easy enough so as not to confuse too many of you. You really can
make some nice looking stuff with GSCRIPT.EXE if you do a little experimenting!
Hope you enjoy it..........Now for the REGISTRATION mumbo jumbo...........
-------------------------------------------------------------------------------
5.1 REGISTRATION
(GR.EXE refers to all the files in this package)
GR.EXE is SHAREWARE! Which most of you know means that the author
grants you a trial period to use the software to determine if you would like
to purchase it.
In this case I, David Slater do hereby grant you 30 days to evaluate
GR.EXE to see if it meets your needs and if it does I ask that you register
GR.EXE for the low price of $5.00 + $2.00 shipping and handling. That is
only 7 bucks, about like going out to eat at a fast food resturaunt.
If GR.EXE does not meet your needs then I ask that you discontinue
using it and pass it along to a friend or upload it to your favorite BBS!
However if you do register GR.EXE you will recieve the latest
version of GR.EXE and GSCRIPT.EXE and you will be allowed to use the
REGISTERED version of either program in any of your commercial applications
completely free!
If you decide to upload GR.EXE to a BBS or give it to a friend please
make sure and include the following files...
GR.EXE - The program file
GSCRIPT.EXE - The other program file (the most powerful)
GR.DOC - The documentation (the file you are reading now)
REGGR.FRM - The registration form
SCRIPT.GR - The Demo script
PKEY.EXE - Keyboard reader to show ASCII code#'s
NOTE!: Please do not alter these files in any way!
To register GR.EXE simply print the file REGGR.FRM and fill it out.
Place the form in an envelope along with a CHECK or MONEY order
for $7.00, ($5.00 + $2.00 shipping and handling), and address it to...
D.S. SOFTWARE c/o David Slater !NOTE!
6815 Martha Avenue (Make CHECK or MONEY order
East Ridge, Tennessee payable to David Slater)
37412 U.S. funds only
Thank you for trying GR.EXE and I hope you enjoy the program!
Any questions or comments may be directed to me in the way of
a letter sent to the address above. I am always happy to hear
from you!
David Slater
D.S. SOFTWARE